﻿<UserControl x:Class="WPFHexaEditor.Control.HexByteControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WPFHexaEditor.Control"
             mc:Ignorable="d" MouseEnter="UserControl_MouseEnter" MouseLeave="UserControl_MouseLeave"
             Width="25" Height="22">
    <UserControl.Resources>
        <ToolTip x:Key="ByteToolTip">
            <StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Label Content="Byte :" Width="120"/>
                    <Label Content="{Binding Byte, UpdateSourceTrigger=PropertyChanged}"/>
                </StackPanel>
            </StackPanel>            
        </ToolTip>
    </UserControl.Resources>
    
    <Grid ToolTip="{StaticResource ByteToolTip}">
        <Label x:Name="FirstHexChar" Content="X" HorizontalAlignment="Left" Padding="0" Width="9" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" MouseDown="HexChar_MouseDown" Focusable="True" KeyDown="HexChar_KeyDown"/>
        <Label x:Name="SecondHexChar" Content="X" Padding="0" VerticalContentAlignment="Center" Margin="9,0,0,0" MouseDown="HexChar_MouseDown" Focusable="True" KeyDown="HexChar_KeyDown"/>

    </Grid>
</UserControl>
